-- 获取key
local key = KEYS[1]
-- 获取线程标识
local thread_id = ARGV[1]

-- 查询redis获取线程标识
local thread_id_redis = redis.call('get', key)
-- 判断线程标识是否一致
if thread_id_redis == thread_id then
    -- 删除redis中的线程标识
    redis.call('del', key)
    return 1
else
    return 0
end



